package com.lianxi.hibernate.wang;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class Page<T> implements Serializable {

    /**
     * 数据 the list of paginate result
     */
    private List<T> datas = new ArrayList<T>();
    /**
     * 第几页  the page number
     */
    private int pageNumber;
    /**
     * 一页的大小  the page size
     */
    private int pageSize;
    /**
     * 总页数  the total page of paginate
     */
    private int totalPage;
    /**
     * 总数据行  the total row of paginate
     */
    private int totalRow;


    public Page(int pageNumber, int pageSize, int totalRow, List<T> datas) {
        this.datas = datas;
        this.pageNumber = pageNumber;
        this.pageSize = pageSize;
        this.totalRow = totalRow;
    }

    public Page() {
    }
}
